<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">

    <div class="row">
        <div style="background: #ffffff;">

            <form class="form-horizontal" name="addGAForm" novalidate>
                <div class="panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><strong>{{'新增选项' | dyLanguage}}</strong></h3>
                    </div>

                    <div class="panel-body panel-dialog">
                        <p>{{'请按照提示输入新增选项的基本信息。' | dyLanguage}}</p>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'序号' | dyLanguage}}</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="newAttribute.sort" name="sort" required ng-pattern="/^[1-9]\d*$/"/>
                                </div>
                                <span class="help-block" ng-show="(addGAForm.sort.$untouched && !addGAForm.$submitted) || addGAForm.sort.$valid">{{'请输入选项的序号' | dyLanguage}}</span>
                                <div ng-show="(addGAForm.sort.$touched || addGAForm.$submitted ) && addGAForm.sort.$invalid">
                                    <span class="error-block" ng-show="addGAForm.sort.$error.required">{{'必须要输入选项的序号' | dyLanguage}}</span>
                                    <span class="error-block" ng-show="addGAForm.sort.$error.pattern">{{'必须是大于零的整数' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'分值' | dyLanguage}}</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="newAttribute.score" name="score" required ng-pattern="/^[0-9]\d*$/"/>
                                </div>
                                <span class="help-block" ng-show="(addGAForm.score.$untouched && !addGAForm.$submitted) || addGAForm.score.$valid">{{'请输入选项的分值' | dyLanguage}}</span>
                                <div ng-show="(addGAForm.score.$touched || addGAForm.$submitted ) && addGAForm.score.$invalid">
                                    <span class="error-block" ng-show="addGAForm.score.$error.required">{{'必须要输入选项的分值' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'内容' | dyLanguage}}</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="newAttribute.content" name="content" required/>
                                </div>
                                <span class="help-block" ng-show="(addGAForm.content.$untouched && !addGAForm.$submitted) || addGAForm.content.$valid">{{'请输入选项的内容' | dyLanguage}}</span>
                                <div ng-show="(addGAForm.content.$touched || addGAForm.$submitted ) && addGAForm.content.$invalid">
                                    <span class="error-block" ng-show="addGAForm.content.$error.required">{{'必须要输入选项的内容' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'图片' | dyLanguage}}</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="profile-image">
                                    <img style="min-height: 50px;min-width: 50px;max-width: 100px;max-height: 100px;" ng-src="{{newAttribute.picture | faceUrl}}" ngf-select ngf-change="uploadImage($files)" ngf-pattern="'image/*'"
                                         ngf-accept="'image/*'" ngf-max-size="20MB" ngf-min-height="100" ngf-resize="{width: 1000, height: 1000}" style="cursor: pointer"/>
                                </div>
                                <span class="help-block">{{'请上传图片' | dyLanguage}}<i style="cursor: pointer; "><span ng-show="showPictureProgress">({{pictureProgress.value}}%)</span></i></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'下一题' | dyLanguage}}</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="newAttribute.nextItemCode"/>
                                </div>
                                <span class="help-block">{{'请输入下一题的题号' | dyLanguage}}</span>
                            </div>
                        </div>


                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-danger" ng-click="cancel()"><i class="fa fa-times"></i>{{'取消' | dyLanguage}}</button>
                        <button class="btn btn-info" ng-click="submit()"><i class="fa fa-check"></i>{{'确定' | dyLanguage}}</button>
                    </div>
                </div>
            </form>

        </div>
    </div>

</div>
<!-- END PAGE CONTENT WRAPPER -->